1. Field of the Invention
The present invention relates to a data processor and more particularly to a data processor capable of executing string operation at a high speed.
2. Description of the Related Art
Generally, data processors such as microprocessors perform processings such as a transfer, comparison and search of data (hereinafter called string) in which only the arbitrary number of 8-bit, 16-bit or 32-bit data (hereinafter each data called element) is linearly and sequentially arranged. In the case where such processings are performed by conventional data processors, the transfer, comparison and search of a string with an arbitrary length have been executed by repeating of transfer, comparison and search in element units by the number of times according to string length.
An example of conventional microprocessors performing such string transfer is described, for example, in detail in the section 3.6 of "i486TM PROCESSOR PROGRAMMER'S REFERENCE MANUAL 1990" of Intel Corporation.
In the case where the transfer, comparison and search in element units are performed by data processors such as conventional microprocessors, the data in element units to be operated have been compared with the comparison value specifying instruction termination by an arithmetic unit to detect instruction termination condition. However, in the case where the size of an element is 8 bits and 16 bits, a problem has existed in that, for example, when an arithmetic unit with 32-bit width is used, the remaining 24-bit and 16-bit have not been used for comparison, thereby not making processing speed higher in executing the instructions for performing the transfer, comparison and search of strings.